package com.icangya.DAO.impl;

import com.icangya.DAO.IRwshopPicDAO;
import com.icangya.domain.RwshopPic;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class RwshopPicDAOImpl extends  BaseDAO<RwshopPic> implements IRwshopPicDAO {

    Logger logger = LoggerFactory.getLogger(this.getClass());

    @Override
    public List<RwshopPic> getRwShopPicListByShopId(long id) {

        String hql=" FROM RwshopPic rr where rr.shopId = ? ";
        List<RwshopPic>  list= (List<RwshopPic>) getHibernateTemplate().find(hql,id);
        if(list.size()>0){
            return list;
        }
        return null;
    }
}
